package org.tang.springcloudvv.model;

import java.io.Serializable;
import java.util.Date;

public class Log4jj implements Serializable {
    private Long id;
    private String requestId;
    private Long userId;
    private String userName;

    private String phone;

    private Integer syslevel;

    private String event;

    private String eventPath;

    private String fromApp;

    private String fromAppPort;

    private Integer operresult;

    private String accessip;

    //手动改过字段名，不知道Log4jjExample有没有改干净
    private Date createTime;

    private Integer usedtime;

    private static final long serialVersionUID = 1L;

    public String getRequestId() {
        return requestId;
    }

    public void setRequestId(String requestId) {
        this.requestId = requestId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Integer getSyslevel() {
        return syslevel;
    }

    public void setSyslevel(Integer syslevel) {
        this.syslevel = syslevel;
    }

    public String getEvent() {
        return event;
    }

    public void setEvent(String event) {
        this.event = event;
    }

    public String getEventPath() {
        return eventPath;
    }

    public void setEventPath(String eventPath) {
        this.eventPath = eventPath;
    }

    public String getFromApp() {
        return fromApp;
    }

    public void setFromApp(String fromApp) {
        this.fromApp = fromApp;
    }

    public String getFromAppPort() {
        return fromAppPort;
    }

    public void setFromAppPort(String fromAppPort) {
        this.fromAppPort = fromAppPort;
    }

    public Integer getOperresult() {
        return operresult;
    }

    public void setOperresult(Integer operresult) {
        this.operresult = operresult;
    }

    public String getAccessip() {
        return accessip;
    }

    public void setAccessip(String accessip) {
        this.accessip = accessip;
    }

    public Integer getUsedtime() {
        return usedtime;
    }

    public void setUsedtime(Integer usedtime) {
        this.usedtime = usedtime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userId=").append(userId);
        sb.append(", phone=").append(phone);
        sb.append(", syslevel=").append(syslevel);
        sb.append(", event=").append(event);
        sb.append(", eventPath=").append(eventPath);
        sb.append(", fromApp=").append(fromApp);
        sb.append(", fromAppPort=").append(fromAppPort);
        sb.append(", operresult=").append(operresult);
        sb.append(", accessip=").append(accessip);
        sb.append(", create_time=").append(createTime);
        sb.append(", usedtime=").append(usedtime);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Log4jj other = (Log4jj) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone()))
            && (this.getSyslevel() == null ? other.getSyslevel() == null : this.getSyslevel().equals(other.getSyslevel()))
            && (this.getEvent() == null ? other.getEvent() == null : this.getEvent().equals(other.getEvent()))
            && (this.getEventPath() == null ? other.getEventPath() == null : this.getEventPath().equals(other.getEventPath()))
            && (this.getFromApp() == null ? other.getFromApp() == null : this.getFromApp().equals(other.getFromApp()))
            && (this.getFromAppPort() == null ? other.getFromAppPort() == null : this.getFromAppPort().equals(other.getFromAppPort()))
            && (this.getOperresult() == null ? other.getOperresult() == null : this.getOperresult().equals(other.getOperresult()))
            && (this.getAccessip() == null ? other.getAccessip() == null : this.getAccessip().equals(other.getAccessip()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUsedtime() == null ? other.getUsedtime() == null : this.getUsedtime().equals(other.getUsedtime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
        result = prime * result + ((getSyslevel() == null) ? 0 : getSyslevel().hashCode());
        result = prime * result + ((getEvent() == null) ? 0 : getEvent().hashCode());
        result = prime * result + ((getEventPath() == null) ? 0 : getEventPath().hashCode());
        result = prime * result + ((getFromApp() == null) ? 0 : getFromApp().hashCode());
        result = prime * result + ((getFromAppPort() == null) ? 0 : getFromAppPort().hashCode());
        result = prime * result + ((getOperresult() == null) ? 0 : getOperresult().hashCode());
        result = prime * result + ((getAccessip() == null) ? 0 : getAccessip().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUsedtime() == null) ? 0 : getUsedtime().hashCode());
        return result;
    }
}